package com.mm.service;

import com.mm.exception.ServiceException;
import com.mm.model.Picture;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * 图片service
 *
 * @date 2018/7/19 16:00
 */
public interface PictureService {
	/**
	 * 上传图片
	 *
	 * @param pictureFile MultipartFile
	 */
	Map<String, Object> uploadePicture(MultipartFile pictureFile) throws ServiceException;

	/**
	 * 保存图片
	 *
	 * @param picture Picture
	 */
	void savePicture(Picture picture) throws ServiceException;

	/**
	 * 更新图片
	 *
	 * @param picture Picture
	 */
	void updatePicture(Picture picture);

	/**
	 * 获取图片
	 *
	 * @param pictureId 图片ID
	 * @return Picture
	 * @throws ServiceException
	 */
	Picture getOnePictureById(Long pictureId) throws ServiceException;

	/**
	 * 通过图片ID删除图片
	 *
	 * @param pictureId 图片ID
	 * @throws ServiceException
	 */
	void deletePictureById(Long pictureId) throws ServiceException;

	/**
	 * 获取个人简历关联的图片列表
	 *
	 * @param resumeId 个人简历ID
	 * @return List<Long>
	 */
	List<Long> listPictureIdByResumeId(Long resumeId) throws ServiceException;
}
